//
//  PrivacySettingCell.m
//  Btpin
//
//  Created by Vic on 2019/3/30.
//  Copyright © 2019 Vic. All rights reserved.
//

#import "PrivacySettingCell.h"

@interface PrivacySettingCell ()
{
    UIImageView *iconImgView;
    UILabel *textLbl;
}
@end

@implementation PrivacySettingCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self initUI];
    }
    return self;
}
- (void)initUI {
    iconImgView = [UIToolsControl initImageViewWithFrame:CGRectMake(60*Scale, 16.5*Scale, 12*Scale, 12*Scale) imageName:@"privacysetting_n"];
    [self.contentView addSubview:iconImgView];
    
    textLbl = [UIToolsControl initLabelWithFrame:CGRectMake(EndX(iconImgView)+10*Scale, 0, WIDTH-100*Scale, 45*Scale) text:nil textColor:THEMECOLOR_OF_TEXT_666666 font:Font_13];
    [self.contentView addSubview:textLbl];
    
    UIView *line = [UIToolsControl initViewWithFrame:CGRectMake(StartX(iconImgView), 44.5*Scale, WIDTH-90*Scale, lineH) backgroundColor:THEMECOLOR_OF_TEXT_cccccc];
    [self.contentView addSubview:line];
}
- (void)reloadDataModel:(PublicCategoryElementModel *)model {
    if (model.isSelect) {
        iconImgView.image = [UIImage imageNamed:@"privacysetting_s"];
    } else {
        iconImgView.image = [UIImage imageNamed:@"privacysetting_n"];
    }
    textLbl.text = model.name;
}

- (void)awakeFromNib {
    [super awakeFromNib];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
